package com.jd.controller;

import com.jd.test.event.UserService2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;


//swagger忽略此controller
@ApiIgnore
@RestController
public class HelloController {

    @Autowired
    UserService2 userService;

    @GetMapping("/hello")
    public Object hello(){
        return "hello wrold~";
    }


    @RequestMapping("/register")
    public String register(){
        userService.register("zhangsan");
        return "success";
    }
}
